package com.ludaxu.google;

import android.app.Application;
import android.content.Context;
import android.os.Handler;

/**
 * 代表了当前应用程序
 * 
 * @author ludaxu
 * 
 */
public class BaseApplication extends Application {
	private static BaseApplication application;
	private static int mainTid;
	private static Handler handler;

	// 应用程序启动的时候就调用,需要清单文件application节点配置
	@Override
	public void onCreate() {
		super.onCreate();
		application = this;
		mainTid = android.os.Process.myTid();
		handler = new Handler();
	}

	public static Context getApplication() {
		return application;
	}

	public static int getMainTid() {
		return mainTid;
	}

	public static Handler getHandler() {
		return handler;
	}

}
